<%@ page   pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%
	String target = request.getParameter("target");
	if (target == null){
		target = "en";
	}
	String referer = request.getHeader("referer");
	String refererInputElement;
	
	
	if (referer != null){
			if (referer.indexOf("languageguide.org") == -1){
				referer = null;
				refererInputElement ="";
			}
			else{
			refererInputElement = "<input type=\"hidden\" name=\"referer\" value=\"" + referer + "\">";}
	}
	else refererInputElement ="";
%>
<html>

<head>
<title>Translation Help Login</title>
<style>	
legend{
	font-size: 120%;
	font-weight:bold;
}
body{
	text-align:center;
}
.button_column{
	text-align:center;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>	
<blockquote>
  <p><strong><jsp:include page="message.jsp"/>
  </strong></p>
</blockquote>
 
<fieldset style="border: 2px solid black; width: 500px; margin: auto; text-align:left;"> 
  <legend>Login</legend>
<table width="480" border="0" >
  <tr>
    <td><form action="login_action.jsp" method="POST">
      <table width="100%">
        <tr>
          <td width="54%" align="right" class="td01"><table width="100%">
            <tbody>
              <tr>
                <td width="42%" align="right">User Name&nbsp;<strong>Or</strong>&nbsp;Email Address</td>
              </tr>
            </tbody>
          </table>
            </td>
          <td width="46%" class="td02"><input style="width: 150px;" type="text" name="email" id="email"></td>
        </tr>
        <tr>
          <td align="right" class="td01">Password</td>
          <td class="td02"><input style="width: 150px;" type="password" name="password" id="password"></td>
        </tr>
        <tr>
          <td align="right" class="td01"><table width="100%">
            <tbody>
              <tr>
                <td align="right">Remember Me</td>
              </tr>
            </tbody>
          </table>
           </td>
          <td class="td02"><input type="checkbox" value="remember" name="remember" id="remember"></td>
        </tr>
        <tr>
          <td  colspan="2" class="button_column"><input type="submit" value="Login" name="loginButton" id="loginButton"> </td>
        </tr>
      </table>
      <div style="margin-left:120px;">
      <a href="/user/forgot_password.jsp">Forgot your Password?	</a>
      </div>

      <%= refererInputElement %>
    </form></td>
  </tr>
</table>
</fieldset>
<p>&nbsp;</p>
<fieldset style="border: 2px solid; width: 500px; margin: auto; text-align:left;">
<legend>Create New Account</legend>
<form action="/user/registration_action.jsp" method="POST">
  <p ><strong>
    <jsp:include page="message.jsp"/>  
  </strong></p>
  <table width="100%">
<tr>
  <td align="right" class="td01">User Name*</td>
  <td class="td02"><input style="width: 150px;" type="text" name="username" id="username"></td>
</tr>
<tr>
  <td align="right" class="td01">Password*</td><td class="td02"><input style="width: 150px;" type="password" name="password" id="password"></td>
</tr>
<tr>
  <td align="right" class="td01">Password Confirm*</td>
  <td class="td02"><input style="width: 150px;" type="password" name="password2" id="password2"></td>
</tr>
<!--
<tr>
  <td align="right" class="td01">Remember Me</td><td class="td02"><input type="checkbox" value="remember" name="remember" id="remember"></td>
</tr>-->
<tr>
  <td align="right" class="td01">Name</td>
  <td class="td02"><input style="width: 150px;" type="text" name="name2" id="name3"></td>
</tr>
<tr>
  <td align="right" class="td01">Email Address</td>
  <td class="td02"><input style="width: 150px;" type="text" name="email2" id="email2"></td>
</tr>
<tr>
  <td  colspan="2" class="button_column"><input type="submit" value="Create New Account" name="loginButton" id="loginButton"> 
    <span class="td01">*</span>required</td>
</tr>
</table>
<input type="hidden" name="lang" value="<%= target %>">
<%= refererInputElement %>
</form>
</fieldset>
</body>
</html>